// cookies本地存储
import Cookies from 'js-cookie'

const TokenKey = 'vue__token'

// 存入时间
const TimeKey = 'havetime'

// 存放颜色
const ThemeKey = 'vue__theme'

export function getToken() {
  return Cookies.get(TokenKey) || null
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 设立时间
export function setTime(time) {
  Cookies.set(TimeKey, time)
}

// 获取时间
export function getTime() {
  return Cookies.get(TimeKey)
}

export function getTheme() {
  return Cookies.get(ThemeKey)
}

export function setTheme(theme) {
  Cookies.set(ThemeKey, theme)
}

export function removeTheme() {
  return Cookies.remove(ThemeKey)
}
